Easy Convert is a small application for character conversion in texts. Since it does the conversion on the target itself, it works very fast. (About 50K per second on a IIsi)
There are three basic modes of use:
1) Convert a plain text file
2) Convert the text in the clipboard
3) Make and edit filters to be used in conversion
(Also useful in Easy View and related applications)
Various tasks that are simplified by Easy Convert:
* Conversion to uppercase or lowercase
* Simple encryption for protecting documents
* Elimination of diacritical marks such as accents
* Conversion of 8-bit text into 7-bit text for e-mail
* Conversion of files from unix or MS-DOS
Although there are similar programs with better user interface, this program may be unique in its ability to convert the clipboard. The high speed and the wide range of compatibility may also be the reasons for preference.
-------------
What is a Filter?
Filters used by Easy Convert are character tables that define the conversion process. Each of the 256 characters can be assigned a value. The assigned value will be used in the conversion process.
As a simple example, consider a filter with three assignments:
A » X a » A m » z
When applied on two words, we get:
Adam » XdAz maze » zAze
-------------
CAUTION
“Convert…” command will modify the selected file using the current filter, without asking the user. Unless the filter is invertible, the contents of the file will be changed in an irreversible way. This process cannot be interrupted or reverted.
** APPLY THIS COMMAND ONLY ON FILES WITH A BACKUP COPY **
It is very easy to corrupt a file using the wrong filter. Do not use this command before you are familiar with the application and the filter in use.
-------------
Author
Written by M. Akif Eyler
Bilkent University, 06533 Ankara, Turkey.
e-mail: eyler@trbilun.bitnet
PLEASE DO NOT COMPLAIN IF YOU LOSE ANY DATA BECAUSE OF THIS PROGRAM.
YOU HAVE BEEN WARNED A FEW TIMES ALREADY.
Special thanks to Ömer Ayzan, for the support and ideas in the earlier versions (1988) of Easy Convert.
This program can be distributed freely, for non-commercial purposes, along with the enclosed documents. It may not be sold or exchanged for profit.
The program was developed using Think Pascal 4.0.1, as such it may contain portions copyrighted by Symantec.
-------------
Getting Started
First, make a copy of a sample text file. Open Easy Convert. “Encode” should be checked in the Filter menu. Choose “Convert…” from the File menu. Select the previously copied file. When the watch cursor disappears, open that file with an editor. The file has become unreadable!
Now, choose “Convert…” again, selecting the same file. The file should be reverted to its previous contents.
Note that this is a special property of the “Encode” filter. With other filters, you will not be able to get back the original contents. Now select the last filter from the menu and repeat the process: your file has been converted to uppercase. (No computer program can put the file into the original form, it is gone forever!)
To get a feeling of the second tool, copy some text in Finder or an editor. Switch to Easy Convert and choose “Convert Clipboard” from the Edit menu. Go back to Finder and see the contents of the clipboard.
-------------
Mathematical Definitions
Let C denote the ASCII character set from chr(0) to chr(255).
A _filter_ is a function f from C to C.
I is the _unit_filter_ that maps each char to itself.
Filter f is _invertible_ if it is unto.
Filter f has a _self-inverse_ if f^2=I.
Filter f is _n-circular_ if f^n=I.
Clearly, only a very tiny subset of all possible filters will be invertible.
Remember: k! « k^k for k=256.
*************
How to Use EC
There are three basic modes of use:
1) Convert a plain text file
2) Convert the text in the clipboard
3) Make and edit filters to be used in conversion
File and Edit menus behave in the standard way. At most one file can be open at time, and its filters can be used or edited. Applications (APPL) and filter files (FLTR) can be opened.
Various Save commands will save only the current filter: “Save” in the current file, “Save As…” in a new file, and “Save In…” in an existing file.
Only Cut and Clear commands of the Edit menu are enabled. “Cut” will remove the current filter, without putting it in the clipboard. The last filter in a file cannot be removed.
-------------
Convert…
** APPLY THIS COMMAND ONLY ON FILES WITH A BACKUP COPY **
This command will let the user select a text file. The selected file will be modified using the current filter.
THERE IS NO WAY TO INTERRUPT OR REVERT THIS PROCESS.
This unsafe behavior was selected on purpose, for three reasons:
1) It is significantly faster than writing into a new file
2) The Finder info and other resources (if any) are preserved
3) We already have a backup somewhere, why waste disk space?
-------------
Convert Clipboard
This command will convert the text in the clipboard. This is the recommended way to make conversions in formatted data, such as Excel’s. Any time the little Clipboard window is made active, the clipboard is converted automatically. However, a converted clipboard will not be converted again, even if the filter is changed.
Here is the recipe for making conversions in sequence:
1) Select the proper filter and choose “Convert Clipboard” menu command. The little Clipboard window will be shown.
2) Switch to the application (e.g. Excel).
3) Select and copy some data (at most a few pages).
4) Switch to Easy Convert. _Don’t do anything._
5) Switch back to the application and choose Paste command. The original selection will be replaced by converted data.
Repeat steps 3-5 as many times as necessary.
-------------
Design Filter
When you choose “Edit Filter” command, the current filter is presented in a tabular form. The black squares indicate the assignments. For instance, the “A » X” conversion can be obtained by dragging “X” into “A”. A black “X” will appear where “A” should be.
Dragging a white square will add/replace new assignments. Dragging a black square out of the window will clear an assignment. Multiple selections are not allowed. Modifier keys are not functional.
-------------
Compatibility
The first version of this program was written in 1988 on a Mac Plus using Turbo Pascal. The current version has basically the same conversion routines unmodified. The user interface has been enhanced significantly, without losing compatibility.
Easy Convert should work on all Macs with 1986 ROM’s, i.e. Mac 512K and up, using System 3.x all the way to 7.x.
*************
Standard Filters
“Standard Filters” must be in the same folder for proper utilisation. This file contains the default filter Encode, 3 filters for searching, and one for uppercase conversion.
Filters are always accessed by name, resource numbers are never used or shown to the user. If two filters have the same name, the first will be used.
These filters should be sufficient for most uses. Another file of filters is included to illustrate how it could be utilized to solve problems of another language.
-------------
Encode
This is the only invertible filter in the package, thus it is quite safe to use. (Actually, the inverse filter is itself. Converting a given text _twice_ with this filter will result in the original text) This is the reason why it is the default filter on startup.
This filter gives you very efficient protection on the sensitive parts of your documents.: just copy the portion that you want to encode, choose “Convert Clipboard”, switch back to the application, and paste the encoded data. It is not the best method to protect data, but quite satisfactory for many needs.
Another possible usage might be in electronic communication, where the parties first choose a common filter, and then use partial or complete encryption.
Stronger encryption can be obtained by using control characters in the assignments. The use of 3-circular filters may also increase the level of protection. However, the use of 3-circular filters is not practical on the clipboard.
-------------
Search Filters
These filters are used by Easy View (to be released in April 93) search engine.
• E » e • Ignore differences between lowercase and uppercase
• ê » e • Ignore diacritical marks, such as accents
• É » e • Ignore case differences _and_ diacritical marks
-------------
Uppercase
◊ i » I ◊ This is a simple uppercase filter which converts each letter (including those with diacritical marks) into the corresponding uppercase letter.
-------------
Turkish Filters
The main source of difficulty in Turkish is “I” and “i” being distinct letters. The diacritical marks are also handled in a non-standard way: “c” and “ç” are different letters, but “i” and “î” are the same.
All filters explained above have corresponding filters for Turkish.
Also included are two special filters for conversion of Turkish letters between Mac and PC.